package com.hitqz.robot.api.business.enums;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;

/**
 * 工单状态
 * @author xupkun
 * @date 2024/7/30
 */
@Slf4j
public enum TicketsStatusEnum {

    STATUS_NONE(0, "未执行"),

    STATUS_EXECUTING(1, "执行中"),

    STATUS_PAUSED(2, "暂停中"),

    STATUS_STOP(3, "停止"),

    STATUS_FINISHED(4, "完成"),
    STATUS_FAIL(5, "执行失败"),



    ALLOT_NONE(20, "未分配"),

    ALLOT_ALLOCATION(21, "已分配"),

    ALLOT_DEAL(22, "处理中/进行中"),

    ALLOT_FINISHED(23, "已完结"),


    TICKETS_TASK_WAIT(30, "等待中"),
    TICKETS_TASK_EXECUTING(31, "执行中"),

    TICKETS_TASK_PAUSE(32, "暂停中"),
    TICKETS_TASK_STOP(33, "停止中"),
    TICKETS_TASK_NONE(34, "未开始"),
    TICKETS_TASK_FINISHED(35, "完成"),


    ;

    public final static HashMap<Integer, TicketsStatusEnum> CMD_TICKETS_STATUS = new HashMap<>();


    static {
        for (TicketsStatusEnum value : values()) {
            TicketsStatusEnum.CMD_TICKETS_STATUS.put(value.getCode(), value);
        }
    }



    private final int code;

    private final String desc;


    TicketsStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public String getDesc() {
        return desc;
    }

    public int getCode() {
        return code;
    }
}
